#include <stdio.h>
int main()
{
    //输入1234想得到4 3 2 1
    int i = 0;
    scanf("%d", &i);
    while (i)
    {
        printf("%d ", i % 10);
        i /= 10;
    }
    return 0;
}